package com.estore.manager;

import java.util.List;

import com.estore.entity.AgentBanner;
import com.estore.entity.Agent_Product;
import com.estore.entity.Agent_Profile;
import com.estore.entity.Discount;
import com.estore.entity.ProductList;
import com.estore.entity.ShopInterface;
import com.estore.info.AgentProductInfo;
import com.estore.info.ProductInfo;
import com.estore.info.ShopInfo;

public interface ShopManager {

	public boolean checkAgentAvail(Integer userID);

	public void regShop(ShopInfo info);

	public boolean checkAgentNameAvail(String agentName);

	public boolean checkEmailAvail(String email);

	public boolean checkPhoneNumberAvail(String phoneNumber);

	public ShopInfo getShopInfo(Integer userID);

	public ShopInfo getShopInfoByAgentID(Integer agentID);

	public void changeShopProfile(ShopInfo info);

	public void updateLogo(String logo, Integer agentID);

	public void addProductInfoByShop(Integer productID,
			AgentProductInfo agentProduct, Integer saleType, Integer agentID);

	public boolean checkListAvail(Integer productID, Integer agentID);

	public List<ProductList> getAllProductOfShop(Integer agentID);

	public Agent_Product getAgentProductInfo(Integer listID);

	public List<AgentProductInfo> getListAgentSellingProduct(Integer productID);

	public List<Agent_Profile> getAllAgent();

	// get lowest price (order by discount if have)
	public AgentProductInfo getLowestPrice(Integer ProductID);

	public void setDefaultInterface(Integer agentID);

	public ShopInterface getShopInterface(Integer agentID);

	public Integer getAgentID(String agentName);

	public void editBanner(ShopInterface shop);

	public void editCategoriesBar(ShopInterface shop);

	public void editProductType(ShopInterface shop);

	public void editTemplate(ShopInterface shop);

	public List<AgentBanner> listAgentBanner(Integer agentID);

	public void deleteBanner(Integer agentID, String linkBanner);

	public void addShopBanner(Integer agentID, List<String> listLinkBanner);

	public void setBannerTittle(AgentBanner banner);

	public ProductList getProductList(Integer productID, Integer agentID);

	public void changeProductInfo(AgentProductInfo info);

	public ProductList getProductList(Integer listID);

	public void makeDiscount(Discount discount, Integer duration);

	public boolean checkDiscountAvailable(Integer listID);

	public Discount getDiscount(Integer listID);

	public void editDiscount(Discount discount);

	// pending
	public List<ProductInfo> getList12MostDiscountProduct();
	
	public String getShopAutoComplete(Integer agentID);
	
	// return exactly result product of shop
	public List<ProductInfo> listExactlyResultForShop(String searchText, Integer agentID);
	
	// return full-text-search result product of shop
	public List<ProductInfo> listFullTextSearchResultForShop(String searchText, Integer agentID);
	
	public void endDiscount(Integer listID);
	
	public Agent_Profile getAgentProfile(Integer agentID);
	
	public void endList(Integer listID);
	
	// search agent by agent name
	public List<Agent_Profile> searchAgentByAgentName(String agentName, boolean searchType);
}
